import 'package:canteen/page/add_PR.dart';
import 'package:canteen/page/add_ingredient_page.dart';
import 'package:canteen/page/add_order_page.dart';
import 'package:canteen/page/calc_page.dart';
import 'package:canteen/page/choose_pR_page.dart';
import 'package:canteen/page/edit_line_page.dart';
import 'package:canteen/page/edit_menu_page.dart';
import 'package:canteen/page/edit_set_meal_page.dart';
import 'package:canteen/page/history_page.dart';
import 'package:canteen/page/home_page.dart';
import 'package:canteen/page/init_page.dart';
import 'package:canteen/page/login_page.dart';
import 'package:canteen/page/manage_staff_page.dart';
import 'package:canteen/page/menu_page.dart';
import 'package:canteen/page/register_page.dart';
import 'package:canteen/page/staff_detail_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() {
  // 设置为透明
  SystemChrome.setSystemUIOverlayStyle(
      const SystemUiOverlayStyle(statusBarColor: Colors.transparent));
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: '徐生记',
      initialRoute: InitPage.id,
      routes: {
        HomePage.id: (context) => HomePage(),
        AddOrderPage.id: (context) => AddOrderPage(),
        CalculatePage.id: (context) => CalculatePage(),
        MenuPage.id: (context) => MenuPage(),
        AddIngredientPage.id: (context) => AddIngredientPage(),
        EditSetMealPage.id: (context) => EditSetMealPage(),
        EditMenuPage.id: (context) => EditMenuPage(),
        EditLinePage.id: (context) => EditLinePage(),
        HistoryPage.id: (context) => HistoryPage(),
        ChoosePRPage.id: (context) => ChoosePRPage(),
        AddPR.id: (context) => AddPR(),
        LoginPage.id: (context) => LoginPage(),
        RegisterPage.id:(context) => RegisterPage(),
        InitPage.id:(context) => InitPage(),
        ManageStaffPage.id:(context) => ManageStaffPage(),
        StaffDetailPage.id:(context) => StaffDetailPage(),
      },
      theme: ThemeData(
        pageTransitionsTheme: PageTransitionsTheme(
          builders: {
            TargetPlatform.android: CupertinoPageTransitionsBuilder(),
            TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
          },
        ),
      ),
    );
  }
}
